/**
 * ship-device edit
 */
let _this;
let _loading;
layui.use(['form', 'tableSelect', 'layedit', 'laydate'], function () {
    let form,layer,tableSelect,layedit,laydate,$;
    form = layui.form,
        layer = layui.layer,
        tableSelect = layui.tableSelect,
        layedit = layui.layedit,
        laydate = layui.laydate,
        $ = layui.$;

    let u = localStorage.getItem("ADMIN_LOGIN");
    let loginU = {};
    if (u == undefined) {
        layer.msg('请登录', {icon: 1, time: 500}, function () {
            window.location = 'page/login.html';
        });
    } else {
        loginU = decryptLocalStorage(u);
    }
    let _data = localStorage.getItem("boatmanData");
    let viewData = undefined;
    let shipId = "";

    if (_data != undefined) {
        viewData = decryptLocalStorage(_data, loginU.token);
        $("#shipId").val(viewData.shipId);
        $("#shipName").val(viewData.shipName);
        $("#name").val(viewData.name);
        $("#jobNumber").val(viewData.jobNumber);
        $("#idType").val(viewData.idType);
        $("#idNumber").val(viewData.idNumber);
        $("#job").val(viewData.job);
        $("#jobTag").val(viewData.jobTag);
        $("#remark").val(viewData.remark);
        form.render('select');
    }

});
